package com.winsdom.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@ApiModel(description = "用户名和节点ID列表")
@Data
public class JurisdictionDTO {

    @ApiModelProperty(value = "用户名", example = "CQ0001", required = true)
    @NotBlank(message = "用户名不能为空")
    private String username;

    @ApiModelProperty(value = "节点ID列表，允许空列表，但每个元素不能为null", example = "[13]")
    @Valid
    private List<@NotNull(message = "Node ID不能为null.") Long> nodeIds;
}
